package homebuh
{
	import homebuh.controller.ApplicationStartupCommand;
	import homebuh.controller.LoginCommand;
	import org.puremvc.as3.patterns.facade.Facade;

	public class ApplicationFacade extends Facade
	{
		public static const APP_STARTUP : String = "appStartup";
		public static const LOGIN : String = "login";
						
		public static function getInstance(): ApplicationFacade
		{
			if (instance == null) 
				instance = new ApplicationFacade();
			return instance as ApplicationFacade;
		}

		override protected function initializeController(): void 
		{
			super.initializeController();
			
			registerCommand(APP_STARTUP, ApplicationStartupCommand);
			registerCommand(LOGIN, LoginCommand);
		}		

		public function startup(app: App):void
		{
			this.sendNotification(ApplicationFacade.APP_STARTUP, app);
		}
 	}
}